//  This file is part of Swordbible - http://www.swordwarrior.net
//  Copyright (C) 2003-2008 Manu Mital mital.manu@gmail.com

//  This program is free software; you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation; either version 2, or (at your option)
//  any later version.

//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.

//  You should have received a copy of the GNU General Public License
//  along with this program; if not, write to the Free Software Foundation,
//  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

#pragma once

#include "SwordBibleFonts.h"
#include "afxcmn.h"
#include "afxdtctl.h"
#include "AutoRichEditCtrl.h"
#include "MyToolBar.h"
#include "ColorMgr.h"
#include "RangeSet.h"
#include "transparentimage.h"


// CDevotionalPage dialog

class CDevotionalPage : public CPropertyPage
{
	DECLARE_DYNAMIC(CDevotionalPage)

public:
	CDevotionalPage();
	static int staticPageCount;
	static int active;
	sword::SWModule* pModule;
	static CSwordBibleFonts font;
	virtual ~CDevotionalPage();
    CRangeSet tips;
	int month, day;
	BOOL m_devotionStartup;
	CAutoRichEditCtrl m_devotionalRich;
	CMonthCalCtrl DDCalendarCtrl;
	CPoint pt;
	CTransparentImage CrystalCal;
	CAutoRichEditCtrl m_richeditDate;

protected:
	CMyToolBar m_wndFormatBar;

// Dialog Data
	enum { IDD = IDD_DEVOTIONALPAGE };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnSize(UINT nType, int cx, int cy);
	virtual BOOL OnInitDialog();
	void showText();
	void CreateTips();
	afx_msg void OnPrint();
	afx_msg void OnDevotionalDisplay();
	afx_msg void OnPreviousDate();
	afx_msg void OnNextDate();
	afx_msg void OnSelectAll();
	afx_msg void OnDevotionalCopy();
	afx_msg void OnZoom();
	afx_msg void OnUpdateZoom(CCmdUI *pCmdUI);
	BOOL OnToolTipNotify(UINT id, NMHDR *pNMHDR,   LRESULT *pResult);
	afx_msg void OnBnClickedDevotionStartup();	
	afx_msg void OnEnMsgFilter(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnSelDDCalendar(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnShowVersions();
	afx_msg void OnFocusRicheditDate();


public:
	virtual BOOL OnSetActive();

	
private:
		void ZoomText();
		void OnRightButtonDown();
};
